#include "gtest/gtest.h"
#include "gmock/gmock.h"

#include "judge/include/judge_def.h"
#include "judge/include/judge_util.h"

#define MY_ASSERT_EQ(expect,input)\
	if (expect==input){ASSERT_TRUE(expect==input);} else {printf("expect %d, but input %d\r\n",expect,input);ASSERT_TRUE(expect==input);}

TEST(judger_checker_suite, case1) {
	int ret = compare("test/data_1.in","test/data_ans.in");
	MY_ASSERT_EQ(V_AC,ret);
}

TEST(judger_checker_suite, case2) {
	int ret = compare("test/data_2.in","test/data_ans.in");
	MY_ASSERT_EQ(V_AC,ret);
}

TEST(judger_checker_suite, case3) {
	int ret = compare("test/data_3.in","test/data_ans.in");
	MY_ASSERT_EQ(V_WA,ret);
}

TEST(judger_checker_suite, case4) {
	int ret = compare("test/data_4.in","test/data_ans.in");
	MY_ASSERT_EQ(V_PE,ret);
}

TEST(judger_checker_suite, case5) {
	int ret = compare("test/data_5.in","test/data_ans.in");
	MY_ASSERT_EQ(V_WA,ret);
}

TEST(judger_checker_suite, case6) {
	int ret = compare("test/data_6.in","test/data_ans.in");
	MY_ASSERT_EQ(V_PE,ret);
}

TEST(judger_checker_suite, mul_line_no_cr_return_wa) {
	int ret = compare("test/1_1.in","test/1_ans.in");
	MY_ASSERT_EQ(V_WA,ret);
}
TEST(judger_checker_suite, ignore_space_of_line_tailer) {
	int ret = compare("test/1_2.in","test/1_ans.in");
	MY_ASSERT_EQ(V_AC,ret);
}

TEST(judger_checker_suite, NULL_equal_CR) {
	int ret = compare("test/2_1.out","test/2_ans.out");
	MY_ASSERT_EQ(V_AC,ret);
}
